<div class="dux-page-header uk-clearfix">
    <div class="page-title">
        <a class="uk-button uk-button-primary" href="{url('index')}"> 返回列表</a>
    </div>
    <div class="page-action">
        <a class="uk-button uk-button-danger" href="javascript:location.reload();"><i class="fa fa-refresh"></i></a>
    </div>
</div>

<div class="uk-margin-top">
    <div class="uk-card uk-card-small uk-card-default dux-panel">
        <div class="uk-card-header">{$assignName}广告位</div>
        <div class="uk-card-body">
            <form class="dux-form uk-form  uk-form-horizontal  " method="post" data-dux="form-bind" data-advanced="false">
                <fieldset>
                	<div class="uk-form-group">
                        <label class=" uk-form-label">广告区域</label>
                        <div class="uk-form-controls">
                            <select name="region_id" id="region_id" class="uk-form-field" required>
                                <!--loop{$regionList as $vo}-->
                                <option value="{$vo.region_id}"
                                <!--if{ $vo['region_id'] == $info['region_id'] }--> selected <!--{/if}-->
                                >{$vo.name}</option>
                                <!--{/loop}-->
                            </select>
                        </div>
                    </div>
                    <div class="uk-form-group " >
                        <label class=" uk-form-label">广告位图片</label>
                        <div class="uk-form-controls">
                            <div class="uk-input-group">
                                <input type="text"  class="uk-form-field" name="image" id="image" value="{$info.image}"
                                       placeholder="可选,上传广告位标题图">
                                        <span class="uk-input-group-btn">
                                            <button class="uk-button uk-button-default" type="button" data-dux="form-upload"
                                                    data-target="#image" data-type="jpg,png,bmp"><i
                                                    class="fa fa-upload"></i></button>
                                        </span>
                                <span class="uk-input-group-btn">
                                            <button class="uk-button uk-button-default" type="button" data-dux="form-imgShow"
                                                    data-target="#image" ><i class="fa fa-photo"></i></button>
                                        </span>
                            </div>
                        </div>
                    </div>
                    <div class="uk-form-group">
                        <label class=" uk-form-label">广告位名称</label>
                        <div class="uk-form-controls">
                            <input type="text" name="name" value="{$info.name}" placeholder="请输入广告位名称" required>
                        </div>
                    </div>
                    <div class="uk-form-group">
                        <label class=" uk-form-label">广告位标识</label>
                        <div class="uk-form-controls">
                            <input type="text" name="label" value="{$info.label}" placeholder="方便广告位调用不可重复" required>
                        </div>
                    </div>
                    <div class="uk-form-group">
                        <label class=" uk-form-label">广告位顺序</label>
                        <div class="uk-form-controls">
                            <input type="text" name="sort" value="{$info.sort}" placeholder="广告位排列顺序" required>
                        </div>
                    </div>
					<div class="uk-form-group">
                        <label class=" uk-form-label">广告数量</label>
                        <div class="uk-form-controls">
                            <input type="text" name="number" value="{$info.number}" placeholder="广告数量调取广告数量" required>
                        </div>
                    </div>
                    <div class="uk-form-group">
                        <label class=" uk-form-label">广告类型</label>
                        <div class="uk-form-controls uk-form-controls-text">
                            <div class="uk-grid">
                                <label>
                                    <!--if{!$info['type']}-->
                                    <input name="type" checked="checked" value="0" type="radio"  class="uk-radio" >
                                    <!--{else}-->
                                    <input  name="type" value="0" type="radio"  class="uk-radio" >
                                    <!--{/if}-->
                                    文字
                                </label>

                                <label>
                                    <!--if{$info['type']}-->
                                    <input name="type" value="1" checked="checked" type="radio"  class="uk-radio" >
                                    <!--{else}-->
                                    <input name="type" value="1" type="radio"  class="uk-radio" >
                                    <!--{/if}-->
                                    图片
                                </label>
                            </div>
                        </div>
                    </div>


                    <div class="uk-form-group">
                        <label class=" uk-form-label">状态</label>
                        <div class="uk-form-controls">
                            <div class="uk-grid">
                                <?php if(!isset($info['status'])) $info[ 'status']=1 ; ?>
                                <label>
                                    <!--if{$info['status']}-->
                                    <input name="status" checked="checked" value="1" type="radio"  class="uk-radio" >
                                    <!--{else}-->
                                    <input  name="status" value="1" type="radio"  class="uk-radio" >
                                    <!--{/if}-->
                                    正常
                                </label>

                                <label>
                                    <!--if{!$info['status']}-->
                                    <input name="status" value="0" checked="checked" type="radio"  class="uk-radio" >
                                    <!--{else}-->
                                    <input name="status" value="0" type="radio"  class="uk-radio" >
                                    <!--{/if}-->
                                    禁用
                                </label>
                            </div>
                        </div>
                    </div>

                    <div class="uk-form-group">
                        <div class="uk-form-controls">
                            <input type="hidden" name="pos_id" value="{$info.pos_id}">
                            <button class="uk-button uk-button-primary" type="submit" disabled>保存</button>
                        </div>
                    </div>

                </fieldset>
            </form>
        </div>
    </div>
</div>